#!/bin/sh

export PWD="`pwd`"

echo "
[Desktop Entry]
Version=1.0
Type=Application
MimeType=x-scheme-handler/minitubehttp;x-scheme-handler/minitubehttps;
Terminal=false
Icon[en_US]=$PWD/data/minitube.svg
Name[en_US]=Minitube
Exec=bash -c 'export U=\"%u\"; $PWD/minitube \${U#minitube}'
Name=Minitube
Icon=/home/nicu/Stuff/minitube/data/minitube.svg
" > ~/.local/share/applications/Minitube.desktop
chmod +x ~/.local/share/applications/Minitube.desktop
xdg-mime default Minitube.desktop x-scheme-handler/minitubehttp
xdg-mime default Minitube.desktop x-scheme-handler/minitubehttps

